package com.symone.webcms.service;

import com.symone.webcms.model.Message;
import com.baomidou.mybatisplus.service.IService;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.symone.webcms.model.vo.MessageVO;

import java.util.List;
/**
 *   @description : Message 服务接口
 *   ---------------------------------
 * 	 @author Archer Chu
 *   @since 2019-03-13
 */
public interface MessageService extends IService<Message> {

        boolean insert(Message message);

        Page<Message> findPage(Page<Message> page, Wrapper<Message> message);

        List<Message> findAll();

        int delete(long id);

        boolean deleteFlagById(long id);

        int clear();

        List<MessageVO> getMessageSendBox(Long fromId, Integer isRead);

        List<MessageVO> getMessageRecieveBox( Long toId, Integer isRead);

        Page<MessageVO> getMessageSendBoxPage(Page<MessageVO> page,Long fromId, Integer isRead);

        Page<MessageVO> getMessageRecieveBoxPage(Page<MessageVO> page, Long toId,Integer isRead);

        MessageVO getMessageVOById(Long id,Long userId);

    boolean batchDelete(String ids);
}
